package com.wzn.mq.component;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.google.protobuf.InvalidProtocolBufferException;
import com.wzn.mq.domain.ProtocBaseRequest.BaseRequest;

@Component
@RabbitListener(queues = "user")
public class UserReceiver {
	@RabbitHandler
	public void process(byte[] bs) throws InvalidProtocolBufferException {
		System.out.println("UserReceiver>>>" + BaseRequest.parseFrom(bs).getSpareParameterMap().get("a"));
	}
}
